﻿namespace AuthenticationService.Utils
{
    public class HttpUtils
    {
        public static string ParseUrl(Microsoft.AspNetCore.Http.HttpRequest request, string paramName)
        {
            // 获取查询字符串中的参数
            var queryParameters = Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(request.QueryString.ToString());

            // 返回指定参数的值
            return queryParameters.ContainsKey(paramName) ? queryParameters[paramName].ToString() : string.Empty;
        }
    }
}